package com.hainatong.shiphelper.module.warehouse.adapter;

import com.hainatong.shiphelper.databinding.ItemShipWarehouseViewBinding;
import com.hainatong.shiphelper.module.warehouse.entity.ShipWareHouseBean;
import org.jetbrains.annotations.NotNull;

import com.chad.library.adapter.base.BaseQuickAdapter;
import com.chad.library.adapter.base.viewholder.BaseDataBindingHolder;
import com.hainatong.shiphelper.R;

public class ShipWareHouseAdapter extends BaseQuickAdapter<ShipWareHouseBean, BaseDataBindingHolder<ItemShipWarehouseViewBinding>>
{
    public ShipWareHouseAdapter()
    {
        super(R.layout.item_ship_warehouse_view);
    }

    @Override
    protected void convert(@NotNull BaseDataBindingHolder<ItemShipWarehouseViewBinding> bindingHolder, ShipWareHouseBean whBean)
    {
        ItemShipWarehouseViewBinding binding = bindingHolder.getDataBinding();
        if( binding != null )
        {
            binding.setShipwh( whBean );
            binding.executePendingBindings();
        }
    }
}
